package com.lemonfish.pojo.vo;

import com.diboot.core.binding.annotation.BindEntity;
import com.lemonfish.pojo.entity.Role;
import com.lemonfish.pojo.entity.User;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * User VO定义
 *
 * @author Lemonfish
 * @version 1.0
 * @date 2020-03-01
 * Copyright © ï¿½Å³ï¿½
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class UserVO extends User {

    private static final long serialVersionUID = -642494270398186759L;

    // 通过中间表的多-多Entity实体关联
    @BindEntity(entity = Role.class, condition = "this.id=user_role.user_id AND user_role.role_id=id AND user_role.is_deleted=0")
    private Role role;
}
